/**
 *	Monopolymorphism - A Java-based monopoly!
 *
 *	The final project of 
 *	Object-Oriented Programming Design of NTUCSIE
 *
 *	Authors:
 *		ChungKingSing.
 *		Qing-Cheng Li.
 */
package monopolymorphism;

public abstract class Property{
	protected int block;
	protected int id;
	protected Player owner;
	protected String name;
	protected int price;
	protected int sell = price/2;
	protected String type;
	
	public abstract void reset();
	public abstract int rent();
	
}

class NormalProperty extends Property{
	protected int houseCost;
	protected int level;
	protected int[] count;
	public NormalProperty(int _b,int _id,Player _p,String _n,int _price,int _hc,int _l,int[] _ary){	
		block = _b;
		id = _id;
		owner = _p;
		name = _n;
		price = _price;
		houseCost = _hc;
		level = _l;
		count = _ary;	
		type = "Normal";
		
	}
	public void reset(){
	
	}
	public int rent(){
		return count[level];
	}
	
}

class AirportProperty extends Property{
	protected int[] count;
	public AirportProperty(int _b,int _id,Player _p,String _n,int _price,int[] _ary){
		block = _b;
		id = _id;
		owner = _p;
		name = _n;
		price = _price;	
		count = _ary;
		type = "Airport";
	}
	public void reset(){
		
	}
	public int rent(){
		return 0;
	}
}

